
var OClone = function(o) {
	
	switch (typeof o) {
		case "string":
		case "number":
		case "function":
			return o;
		case "object":
			var 
				copy = (o instanceof Array) ? [] : {},
				prop
			;
			
			for (prop in o) {
				copy[prop] = OClone(o[prop]);
			}
	}
	
	return copy;
	
};

OAction("clone", {

	all: function(){
		return OClone(this.obj());
	}

});

OProvides("objx.clone");